program TOTALLYNOTAVIRUS;

{$APPTYPE CONSOLE}

uses
  SysUtils;

var
  x1, y1, x0, y0, x, y, r2, d, i, r1, r3, r4 : integer;
  a1, b1, c1, a2, b2, c2, a3, b3, c3, a4, b4, c4 : real;

begin
  writeln('write four coordinates of central points.');
  readln(x0,y0,x1,y1);
  writeln('enter radiuses of your circles here.');
  readln(r,);
  x:=x1-x0;
  y:=y1-y0;
  d:=round(sqrt((x1-x0)*(x1-x0)+(y1-y0)*(y1-y0)));
  r4:=r1+r2;
  if (r1>=r2) then
    r3:=r1-r2
  else
    r3:=r2-r1;
  if (d>=r4) then
  begin
    b1:=(r*y+x*sqrt((d*d)-(r*r)))/(d*d);
    b2:=(r*y-x*sqrt((d*d)-(r*r)))/(d*d);
    b3:=
    a1:=(r*x+y*sqrt((d*d)-(r*r)))/(d*d);
    a2:=(r*x-y*sqrt((d*d)-(r*r)))/(d*d);
    c1:=-a1*x0-b2*y0;
    c2:=-a2*x0-b1*y0;
    writeln('function 1 coefficient', 'a=', a1:0:2, 'b=', b1:0:2, 'c=', c1:0:2, 'function 2 coefficients', 'a=', a2:0:2,'b=', b2:0:2,'c=', c2:0:2);
  end
    else for i:= 5 downto 0 do
    begin
    writeln ('error found, FATAL EROOR OS WILL BE DESTROED IN :', i);
    sleep(1000);
    end;


end.

